Add page to generate newsletter#2804
Draft
cqnykamp wants to merge 18 commits intoDoenet:mainfrom
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a newsletter-generation page to the Astro blog app that compiles recent blog posts into email-friendly HTML, using a <!-- more --> marker to limit excerpts.
Changes:
- Added excerpt extraction + email-cleaning/styling utilities.
- Added a
/blog/generate-newsletterpage that renders posts, extracts excerpts, rewrites URLs, and supports download/copy. - Updated the markdown style guide to document the
<!-- more -->excerpt marker.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
| blog/src/utils/excerpt.ts | New helpers for excerpt extraction and email-oriented HTML cleanup/styling. |
| blog/src/pages/generate-newsletter.astro | New newsletter generator UI + client-side processing and export (download/copy). |
| blog/src/layouts/NewsletterPost.astro | Added an email-friendly post layout (currently appears unused). |
| blog/src/content/markdown-style-guide.md | Adds <!-- more --> marker example to the style guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…il-friendly-newsletter-format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: It's unclear whether we want to merge this to main or not. There are most likely better ways to construct a newsletter.
Adds a new hidden page at
/blog/generate-newsletterthat lets us download email-friendly HTML for recent blog posts.In order to display excerpts instead of full posts, each post should have the marker
where the excerpt should end.